package daily;
//9. 回文数
public class Num9_isPalindrome {
    public boolean isPalindrome(int x) {
        final int res=x;
        //特殊情况
        if (x<0||(x%10==0&&x!=0)){
            return false;
        }
        int cur = 0;
        while (x > 0) {
            cur = cur * 10 + x % 10;
            x /= 10;
        }
        return cur==res;

    }
}
